import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
	base: "/ibest-asr-demo",
	plugins: [vue()],
	assetsDir: "public",
	outDir: "dist",
	resolve: {
		alias: {
			"@": path.resolve(__dirname, "src"),
		},
	},
	server: {
		proxy: {
			"/api": {
				target: "http://47.97.152.171:8100/", // 目标服务器的地址
				changeOrigin: true, // 是否改变源地址
				rewrite: (path) => path.replace(/^\/api/, ""), // 重写路径
			},
		},
	},
});
